const jwt = require("jsonwebtoken");
const secret =''

class TokenService {
  createToken(cont, time) {
    return jwt.sign(cont, secret, {expiresIn: time});
  }
  checkToken(token,callback) {
    jwt.verify(token, secret, function (err, decode) {
      callback(err,decode)
    });
  }
}

module.exports= new TokenService();
